<?php

namespace Admin\Controller;
use Think\Controller;

class ToolsController extends CommonController {
	
	//验证摸个值在数据库里面是否存在通用函数
	public function Searchusername(){
		$data=M('user');
		$condition['name']=$_POST['name'];
		if($data->where($condition)->find()){
			$find=1;
			$this->ajaxReturn($find);
		}else{
			$find=0;
			$this->ajaxReturn($find);
		}
	}
}


?>